<?php
/* @var $this GatewayController */
/* @var $model Gateway */
 
$this->breadcrumbs=array(
	'Gateways'=>array('index'),
	'GatewayMap',
);
 
if(Yii::app()->user->name=="admin"){
	    $this->menu=array(
	    	array('label'=>'路由器信息', 'url'=>array('admin')),
			array('label'=>'创建路由器', 'url'=>array('create')),
            array('label'=>'路由器地图', 'url'=>array('gatewayMap')),
	    );
	   $buttoncolumn ='{view}{update}{delete}';
    }else{
	     $this->menu=array(
			array('label'=>'路由器信息', 'url'=>array('admin')),
	     ); 
	    $buttoncolumn ='{view}';
    } 
 
?>  

<h1>路由器地图分布</h1>

<div id="citylist">
<?php 
    foreach ($model as $key => $value) {
       echo "<div id='title'>".$value['mName']."</div>";
       echo "<div id='cityname'>";
       foreach ( $value['mItems'] as $k => $v) {
          echo "<div id='city'>".'<a href ="'.Yii::app()->createUrl('/gateway/gatewayMap&city='.$v).'">'.$v.'</a>'."</div>";
       } 
       echo '</div><div class="clear"></div>';
    }


?>
</div>